@import (reference) '../../../app/less/typography';
@import (reference) 'config';

.circle-holder {
  position: absolute;

  .circle-loader {
    display: none;
    position: relative;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    line-height: 30px;

    &::after {
      border: none;
      position: absolute;
      top: 2px;
      left: 2px;
      text-align: center;
      display: block;
      border-radius: 50%;
      width: 26px;
      height: 26px;
      background-color: @color-white;
      content: '';
    }

    span {
      position: absolute;
      line-height: 30px;
      font-size: @font-size-caption-4;
      width: 30px;
      text-align: center;
      display: block;
      z-index: 2;
    }

    .left-half-clipper {
      border-radius: 50%;
      width: 31px;
      height: 31px;
      position: absolute;
      clip: rect(0, 30px, 30px, 15px);
    }

    &.over50 .left-half-clipper {
      clip: rect(auto, auto, auto, auto);
    }

    .value-bar {
      position: absolute;
      clip: rect(0, 15px, 30px, 0);
      width: 30px;
      height: 30px;
      border-radius: 50%;
      box-sizing: border-box;
    }

    &.over50 .first50-bar {
      position: absolute;
      clip: rect(0, 30px, 30px, 15px);
      border-radius: 50%;
      width: 30px;
      height: 30px;
    }

    &:not(.over50) .first50-bar {
      display: none;
    }
  }
}

// colors
.sell {
  .circle-loader {
    background-color: @circle-loader-bg-sell; // bg color

    .value-bar,
    &.over50 .first50-bar {
      border: 2px solid @color-error-500; // line color
    }

    span {
      color: @color-error-500; // text color
    }
  }
}

.buy {
  .circle-loader {
    background-color: @circle-loader-bg-buy;  // bg color

    .value-bar,
    &.over50 .first50-bar {
      border: 2px solid @color-submit-400; // line color
    }

    span {
      color: @color-submit-400; // text color
    }
  }
}

@media screen and (max-width: 1190px) {
  .circle-holder {
    .circle-loader {
      display: block;
    }
  }
}
